package main

import "fmt"

// map是key,value的结构，可以直接声明或者使用make函数构建一个map
func main() {
	m := make(map[string]int)
	m["k1"] = 7
	m["k2"] = 13
	fmt.Println("10-map,", m)

	i := m["k1"]
	fmt.Println("m[\"k1\"] is ", i)

	fmt.Println("len 10-map is ", len(m))

	delete(m, "k2")
	fmt.Println("10-map,", m)

	_, ok := m["k2"]
	_, ok1 := m["k1"]
	fmt.Println("prs1,", ok1)
	fmt.Println("prs,", ok)

	n := map[string]int{"foo": 1, "bar": 2}
	fmt.Println("n,", n)

}
